// package: rewords-server-2024
// filename: queues
// author: diogoxiang@gmail.com
// time: 2024/7/15 下午5:35

package queues

import (
	"context"
	"rewords-server-2024/internal/consts"
	"rewords-server-2024/internal/library/queue"
)

func init() {
	queue.RegisterConsumer(LoginLog)
}

// LoginLog 登录日志
var LoginLog = &qLoginLog{}

type qLoginLog struct{}

// GetTopic 主题
func (q *qLoginLog) GetTopic() string {
	return consts.QueueLoginLogTopic
}

// Handle 处理消息
func (q *qLoginLog) Handle(ctx context.Context, mqMsg queue.MqMsg) (err error) {
	//var data entity.SysLoginLog
	//if err = json.Unmarshal(mqMsg.Body, &data); err != nil {
	//	return err
	//}
	//return service.SysLoginLog().RealWrite(ctx, data)
	return
}
